home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-11-30 | 1.8 KB | 90 lines |
- # Makefile for g++ library test files (32 bit int default)
-
- GXX= cgcc
- CC= cgcc
- AR= car
- AS= $(CC)
-
- # common subset of options; no int size or omit-frame-pointer:
- COMMONOPT = -O2 -fstrength-reduce # -m68020 -m68881
- COMMONFLAGS =
- COMMONDEFINES =
-
- COPTS= $(COMMONOPT) $(COMMONFLAGS) $(COMMONDEFINES) \
- -DNDEBUG $(XFLAGS)
-
- GXXOPTS= $(COMMONOPT) $(COMMONFLAGS) $(COMMONDEFINES) \
- $(XXFLAGS)
-
- # Base options CC; includes int size but not omit-frame-pointer
- CFFLAGS = $(COPTS)
- GXXFFLAGS = $(GXXOPTS)
-
- # normal CFLAGS including int size and omit-frame-pointer
- CFLAGS= $(CFFLAGS) -fomit-frame-pointer
- GXXFLAGS = $(GXXFFLAGS) -fomit-frame-pointer
-
- # cflags for stuff that needs to be compiled with 32 bit ints
- CLFLAGS= $(CFLAGS)
- GXXLFLAGS = $(GXXFLAGS)
-
- # flags to $(CC) when it runs the assembler only
- ASFLAGS= -c
-
- # pre-processor flags
- PPFLAGS= -P -DNDEBUG
-
- # ld flags
- LDFLAGS = -v -lpml -s -lg++
-
- # test targets
- TEST= tbitset.ttp tbitstri.ttp tcomplex.ttp tfix.ttp tfix16.ttp \
- tfix24.ttp tgetopt.ttp tinteger.ttp tobstack.ttp trandom.ttp trationa.ttp \
- tstring.ttp tillist.ttp
-
- OBJS = $(TEST:.ttp=.o)
- # the stuff to make
- ALL= $(TEST)
-
- objects: $(OBJS)
- obj: $(OBJS)
-
- # g++ files should have extension .cc
- # generated test files will habe .ttp extn
-
- .SUFFIXES: .ttp .cc
- .cc.o:
- $(GXX) $(GXXFLAGS) -c $<
-
- .o.ttp:
- $(GXX) -o $@ $< $(LDFLAGS)
-
- all: $(ALL)
-
-
- clean:
- rm -f *.o core
-
- realclean: clean
- rm -f $(ALL) core report
-
- tbitset.ttp: tbitset.o
- tbitstri.ttp: tbitstri.o
- tfix.ttp: tfix.o
- tfix16.ttp: tfix16.o
- tfix24.ttp: tfix24.o
- tgetopt.ttp: tgetopt.o
- tinteger.ttp: tinteger.o
- tobstack.ttp: tobstack.o
- trandom.ttp: trandom.o
- trationa.ttp: trationa.o
- tstring.ttp: tstring.o
- tillist.ttp: tillist.o
-
- # ah, the pleasures of single pass linking!
- tcomplex.ttp: tcomplex.o
- $(GXX) -o $@ $< -lg++ -lpml $(LDFLAGS)
-
- trandom.ttp: trandom.o
- $(GXX) -o $@ $< -lg++ -lpml $(LDFLAGS)
-